<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

<ui:composition template="/commons/template.xhtml">

<ui:define name="menu">
	<ui:include src="../commons/menuAdmin.xhtml"/>
</ui:define>

<ui:define name="contenu">
	<h3><h:outputText value="#{msg.gestionUser_titre}"/></h3>
	<h:form> 
		<table>
			<tr>
				<td><h:outputText value="#{msg.gestionUser_formNom}"/></td>
				<td><h:inputText value="#{userForm.user.nom}" styleClass="inputForm"/></td>
			</tr>
			<tr>
				<td><h:outputText value="#{msg.gestionUser_formPrenom}"/></td>
				<td><h:inputText value="#{userForm.user.prenom}" styleClass="inputForm" /></td>
			</tr>
			<tr>
				<td><h:outputText value="#{msg.gestionUser_formEmail}"/></td>
				<td><h:inputText value="#{userForm.user.email}" styleClass="inputForm"/></td>
			</tr>
			<tr>
				<td colspan="2"><h:commandButton action="#{userForm.creer}" value="#{msg.bt_creer}" styleClass="btForm"/></td>
			</tr>
		</table>
	
		<h:dataTable  value="#{userForm.listeUser}" var="user" styleClass="DataTable" headerClass="DataCol" 
		rowClasses="DataRow1,DataRow2" >
			<c:facet name="header"><h:outputText value="#{msg.gestionUser_titreTab}"/></c:facet>	
			<h:column>
				<c:facet name="header"><h:outputText value="#{msg.gestionUser_colNom}"/></c:facet>
				<h:outputText value="#{user.nom}"/>
			</h:column> 
			
			<h:column>
				<c:facet name="header"><h:outputText value="#{msg.gestionUser_colPrenom}"/></c:facet>
				<h:outputText value="#{user.prenom}"/>
			</h:column>
			
			<h:column>
				<c:facet name="header"><h:outputText value="#{msg.gestionUser_colEmail}"/></c:facet>
				<h:outputText value="#{user.email}"/>
			</h:column>
			
			<h:column>
				<c:facet name="header"><h:outputText value="#{msg.gestionUser_colAction}"/></c:facet>
				<h:commandLink action="#{userForm.detail}"><h:outputText value="#{msg.gestionUser_menuDetail}"/></h:commandLink><h:outputText value="      "/>
				<h:commandLink onclick="#{msg.confirmDelete}" action="#{userForm.supprimer}"><h:outputText value="#{msg.gestionUser_menuSupprimer}"/></h:commandLink>								
			</h:column>
		</h:dataTable> 
	</h:form>
	
</ui:define>
</ui:composition>
</html>
	